import request from '@/utils/request'


// 供应商列表
export function getSupplierOptions(data) {
  return request({
    baseURL: window.APP_GETEWAY.pms,
    url: '/v1/base/supplier',
    method: 'post',
    data
  }).then(res => res.data.map(d => ({ label: d.supplier_name, value: d.s_id })))
}

// 1688匹配情况获取接口
export function getProductDetail(params) {
  return request({
    baseURL: window.APP_GETEWAY.pms,
    url: '/v1/product/product/detail',
    method: 'GET',
    params
  })
}

// 1688匹配情况获取接口
export function productAssoc(data) {
  return request({
    baseURL: window.APP_GETEWAY.pms,
    url: '/v1/product/product/assoc',
    method: 'POST',
    data
  })
}

// 匹配
export function productAssocMatch(params) {
  return request({
    baseURL: window.APP_GETEWAY.pms,
    url: '/v1/product/product/match',
    method: 'GET',
    params
  })
}


// 获取品牌列表
export function getBrandList(params) {
  return request({
    url: '/base/brand/get-list',
    method: 'get',
    params
  })
}

// 站点列表
export function getplatformSite(params) {
  return request({
    baseURL: window.APP_GETEWAY.base,
    url: '/v1/platform/sites',
    method: 'GET',
    params
  })
}

// 报关信息查询
export function getCustomSearch(data) {
  return request({
    url: '/v1/goods/sku/custom-search',
    method: 'POST',
    data
  })
}
